export class BaseResponse {
    constructor() {
        this.code = 0
        this.message = ''
    }
}

export class ResponseWithBody extends BaseResponse {
    constructor(body, code, message) {
        super()
        this.code = code
        this.message = message

        Object.keys(body).forEach(field => {
            this[field] = body[field]
        })
    }
}